package com.gen.service;

import java.util.HashMap;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gen.dao.IUser_courseDao;
import com.gen.entity.Student;
import com.gen.entity.User_course;

@Service
public class User_courseServiceImpl implements IUser_courseService{
	@Autowired
	private IUser_courseDao user_courseDao;
	
	public IUser_courseDao getUser_courseDao() {
		return user_courseDao;
	}

	public void setUser_courseDao(IUser_courseDao user_courseDao) {
		this.user_courseDao = user_courseDao;
	}

	@Override
	public int addCourseStudent(HashMap<Object, Object> map) {
		return user_courseDao.addCourseStudent(map);
	}

	@Override
	public List<User_course> selectAllCourseStudents() {
		return user_courseDao.selectAllCourseStudents();
	}

	@Override
	public User_course selectCourseStuentsByCourseId(String courseid) {
		return user_courseDao.selectCourseStuentsByCourseId(courseid);
	}

	@Override
	public List<Student> getStudentsByCourseid(String courseid) {
		return user_courseDao.getStudentsByCourseid(courseid);
	}

	@Override
	public int deleteCourseStudent(HashMap<Object, Object> map) {
		return user_courseDao.deleteCourseStudent(map);
	}

	@Override
	public List<Student> getNoCourseStudents(String courseid) {
		return user_courseDao.getNoCourseStudents(courseid);
	}

	@Override
	public List<User_course> selectCourseStuentsByDepartid(Integer departid) {
		return user_courseDao.selectCourseStuentsByDepartid(departid);
	}

}
